<?php if (!defined('THINK_PATH')) exit(); /*a:2:{s:68:"/var/www/html/tp5/public/../application/mobile/view/Movie/index.html";i:1529924868;s:58:"/var/www/html/tp5/application/mobile/view/Index/index.html";i:1530184607;}*/ ?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <link rel="icon" href="/static/mobile/image/favico.ico">
    <!-- <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0"> -->
    <link href="/static/mobile/css/bootstrap.min.css.map" rel="stylesheet"/>
    <link href="/static/mobile/css/bootstrap.min.css" rel="stylesheet"/>
    <link href="/static/mobile/css/bootstrap-theme.min.css" rel="stylesheet"/>
    <link href="/static/mobile/css/bootstrap-theme.min.css.map" rel="stylesheet"/>
    <script src="https://y.gtimg.cn/music/h5/player/player.js?max_age=2592000" ></script>
    <meta name="qqmusic-set" content="share=0">
    <style>
        a {
            text-decoration: none;
        }
        li {
            list-style: none;
        }
        .nav-top {
            height: 115px;
            border-bottom: 2px solid #BCBCBC;
        }

        .nav-logo {
            height: 60px;
            margin-top: 30px;
            /*background-size:80px 80px;*/
            /*background:url("/static/index/image/logo.png") no-repeat;*/
        }

        .nav-chick input {
            height: 60px;
            margin-top: 32px;

        }

        .nav-chick button {
            height: 60px;
            width: 60px;
            margin-top: 32px;
            margin-left: -10px;
        }

        .nav-login {
            height: 60px;
            margin-top: 35px;
            font-size: 40px;
        }

        .nav-type {
            height: 60px;
            font-size: 40px;
            margin-top: 15px;
        }

        .nav-type ul {
            list-style: none;
        }

        .nav-new {
            font-size: 45px;
            margin-bottom: 30px;
        }

        .nav-movie {
            margin-top: 15px;
        }

        .nav-movie p {
            margin-top: 5px;
            font-size: 40px;
        }

        .nav-movie span {
            font-size: 30px;
            color: goldenrod;
        }

        .nav-score {
            font-size: 45px;
        }
        input::-webkit-input-placeholder { /* WebKit browsers */
color:#999;font-size:25px;
}
    </style>
</head>
<body>

<div class="col-xs-12">
    <div class="nav-top col-xs-12">
        <a href="<?php echo url('index/index/index'); ?>">
            <div class="nav-logo col-xs-4">
                <img src="/static/index/image/logo.png" alt="" height="60">
            </div>
        </a>

        <div class="nav-chick col-xs-5">
            <form action="<?php echo url('search'); ?>" method="get">
                <div class="form-group col-xs-9"><input class="form-control" name="keyword" maxlength="10" placeholder="搜索电影" style="font-size: 30px;" value=""></div>
                <button class="btn btn-default col-xs-3"><span class="glyphicon glyphicon-search"></span></button>
            </form>
        </div>

        <div class="nav-login col-xs-3">

            <?php if(!empty(\think\Session::get('name'))): ?>

                        <a href="<?php echo url('mobile/User/index'); ?>" style="text-decoration: none;color: #46bc99;">主页</a>
                    <a href="<?php echo url('mobile/Login/logOut'); ?>" style="text-decoration: none;color: #46bc99;">注销</a>


            <?php elseif(empty(\think\Session::get('name'))): ?>
            <a href="<?php echo url('mobile/Login/index'); ?>" class="nav-login" rel="nofollow" style="text-decoration: none;color: #46bc99;">登录</a>
            <a href="<?php echo url('mobile/Register/index'); ?>" class="nav-register" rel="nofollow" style="text-decoration: none;color: #46bc99;">注册</a>
            <?php endif; ?>
        </div>

    </div>

    <div class="nav-type col-xs-12">
        <ul class="col-xs-12">
            <li class="col-xs-3"><a href="<?php echo url('mobile/Index/type', ['id'=>'1']); ?>" style="text-decoration: none;color: #46bc99;">华语</a>
            </li>
            <li class="col-xs-3"><a href="<?php echo url('mobile/Index/type', ['id'=>'2']); ?>" style="text-decoration: none;color: #46bc99;">欧美</a>
            </li>
            <li class="col-xs-3"><a href="<?php echo url('mobile/Index/type', ['id'=>'3']); ?>" style="text-decoration: none;color: #46bc99;">韩国</a>
            </li>
            <li class="col-xs-3"><a href="<?php echo url('mobile/Index/type', ['id'=>'4']); ?>" style="text-decoration: none;color: #46bc99;">日本</a>
            </li>
        </ul>
    </div>

    
<style>
    .nav-show {
        margin-top: 20px;
        font-size: 40px;

    }

    .nav-show h1 {
        font-size: 50px;

    }

    .nav-show p {
        color: darkgrey;
    }

    .nav-show p span {
        color: goldenrod;
    }

    .nav-push {
        margin-top: 30px;
        font-size: 50px;
    }

    .nav-push ul {
        list-style: none;
    }

    .nav-push li {
        text-align: center;
    }

    .nav-push button{
    height: 70px;
    font-size:40px;
    }


    .nav-des {
        margin-top: 30px;
        font-size: 40px;
    }
    .nav-des h2 {
        font-size: 40px;
        color: darkgrey;
    }
    .nav-com {
        font-size: 40px;
        margin-top: 30px;
        color: darkgrey;
    }
    .nav-com h2 {
        font-size: 50px;
    }
    .nav-com h3{
        font-size: 40px;

    }

</style>
<div class="nav-show col-xs-12">
    <div class="nav-name col-xs-7">
        <h1><?php echo $data['mname']; ?></h1>
        <p><span><?php echo $data['score']; ?></span>分&nbsp;<span><?php echo $people; ?></span>人评价</p>
        <span><?php echo $data['mtime']; ?>分钟 / <?php echo $data['type']; ?> / <?php echo $data['director']; ?>(导演) /
             <?php foreach($res as $v): ?>
            <?php echo $v['name']; ?> /
            <?php endforeach; ?>
            <?php echo $data['myear']; ?>上映
        </span>
    </div>

    <div class="col-xs-5" style="margin-top:60px;">
        <img src="../../../../../uploads/<?php echo $data['cover']; ?>" rel="v:image" width="350"/>
    </div>
</div>

<div class="nav-push col-xs-12">
    <ul class="">
        <li class="col-xs-6">
            <?php if(empty(\think\Session::get('id'))): ?>
            <a class="j " href="<?php echo url('mobile/Login/index'); ?>" rel="nofollow" style="text-decoration: none;">写短评</a>
            <?php else: if(empty($com)): ?>
            <a class="j " href="<?php echo url('mobile/Comment/insert',['id'=>$data['id']]); ?>" rel="nofollow" style="text-decoration: none;">写短评</a>
            <?php else: ?>
            <b>已评论</b>
            <?php endif; endif; ?>

        </li>
        <li  class="col-xs-6">
            <?php if(empty(\think\Session::get('id'))): ?>
            <a  class="j" href="<?php echo url('index/Login/index'); ?>" >收藏</a>
            <?php else: if($data['id']==$fav['id']): ?>
            <button class="btn btn-warning btn" id="del-btn" data-id="<?php echo $data['id']; ?>" status="1">取消收藏</button>
            <?php else: ?>
            <button class="btn btn-warning btn" id="del-btn" data-id="<?php echo $data['id']; ?>" status="0">收藏</button>
            <?php endif; endif; ?>
        </li>

        <script type="text/javascript" src="/static/admin/js/jquery.min.js"></script>
        <script type="text/javascript" src="/static/admin/js/bootstrap.min.js"></script>
        <script>
            $(function(){

                // 触发取消收藏/收藏
                $('#del-btn').click(function (){
                    var mv_id = $(this).attr('data-id');
                    var id = $(this).attr('id');
                    var obj = $(this);
                    if(obj.attr('status')==1){
                        console.log(obj.attr('status'));
                        delAjax(mv_id, obj);
                    }else{
                        console.log(obj.attr('status'));
                        getAjax(mv_id, obj);
                    }
                });



                // AJAX取消
                function delAjax(id,obj){
                    $.ajax({
                        type: 'post',
                        url: '/mobile/Index/delfav',
                        data: {
                            id:id
                        },
                        dataType: 'json',
                        success: function (data) {
                            if (data.status) {
                                obj.text('收藏');
                                obj.attr('status','0');
                            } else {
                            }
                        },
                        error: function () {
                            alert('AJAX操作失败');
                        }
                    });
//                    return false;
                }

                // AJAX收藏
                function getAjax(id,obj){
                    $.ajax({
                        type: 'post',
                        url: '/mobile/Index/favorite',
                        data: {
                            id:id
                        },
                        dataType: 'json',
                        success: function (data) {
                            if (data.status) {
                                obj.text('取消收藏');
                                obj.attr('status','1');
                            } else {
                            }
                        },
                        error: function () {
                            alert('AJAX操作失败');
                        }
                    });
//                    return false;
                }
            })
        </script>

    </ul>
</div>
<div class="nav-des col-xs-12">
    <a name="intro"></a>
    <h2>
        <i class="">剧情简介</i>
        · · · · · ·
    </h2>

    <div class="i">

                        <span property="v:summary" class="">
                                　　<?php echo $data['describe']; ?>
                        </span>

    </div>
</div>
<div class="nav-com col-xs-12">
    <h2>
        <?php echo $data['mname']; ?>的影评(
        <?php if($people!=0): ?>
        <span class="pl">全部 <?php echo $people; ?> 条</span>
        <?php else: ?> <span class="pl">暂无评论</span>
        <?php endif; ?>)
    </h2>
</div>
<?php if(is_array($rev) || $rev instanceof \think\Collection || $rev instanceof \think\Paginator): $i = 0; $__LIST__ = $rev;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$c): $mod = ($i % 2 );++$i;?>

<div class="nav-com col-xs-12">
        <a href = "javascript:return false" class="avator" >
            <?php if(empty($c['face'])): ?>
            <img width="84" height="84" src="/static/index/face/face.png">
            <?php else: ?>
            <img width="84" height="84" src="/uploads/<?php echo $c['face']; ?>">
            <?php endif; ?>
        </a>
        <span style="color:black;"><?php echo $c['name']; ?>&nbsp;</span>
        <span property="v:dtreviewed" content="2018-03-24" class="main-meta"><?php echo $c['time']; ?></span>


    <div class="main-bd">

        <h3><?php echo $c['title']; ?></h3>
            <p class="col-xs-11 text-justify" style="color:black;word-break:break-all;word-wrap:break-word">
                <?php echo $c['comment']; ?>
            </p>
    </div>
</div>
<?php endforeach; endif; else: echo "" ;endif; ?>

</div>
<script>
	// 初始化播放组件
var player = new QMplayer({ target: "auto" }); // 设置 target=music 时会拉起QQ音乐客户端进行播放

// 播放歌曲
player.play("003UBdiz0uPjxw");

// 监听事件
player.on("play", function () { })

// 支持的方法：play、pause、toggle、playReady、on、off
// 支持的事件：play、pause、ended、timeupdate、waiting、error

</script>

</body>
</html>